<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Example</title>
</head>

<body>
    <script type="text/javascript">
    try {
        var myArray;
        for (var i = 0; i < myArray.length; i++) {
            document.writeln("Index " + i + ": " + myArray[i]);
        }
    } catch (e) {
        document.writeln("Error: " + e);
    }
    </script>
</body>

</html>
